<?php

namespace App\Modules\Apicrzs\Http\Controllers\System;

use App\Modules\Apicrzs\Http\Controllers\BaseApicrzsController;
use App\Modules\Apicrzs\Services\Public\SystemDeviceService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class SystemController extends BaseApicrzsController
{
    public function __construct(SystemDeviceService $authService)
    {
        $this->service = $authService;
    }
    public function systemInfo(Request $request): JsonResponse
    {
        $params = $request->all();

        $result = $this->service->create($params);
        return $this->sendApiSuccess([], $this->service->getError());
    }

    public function versionLogs(Request $request): JsonResponse
    {
        $params = $request->all();
        return $this->sendApiSuccess(['version'=>'1.5.3'], $this->service->getError());
    }
    public function wxErrorLog(Request $request): JsonResponse
    {
        $params = $request->all();
        xdebug($params,'****小程序日志***','','wx_log');
        return $this->sendApiSuccess([], $this->service->getError());
    }
}
